#!/bin/sh

mkdir /backup
mount /dev/mmcblk0p2 /backup

if [ ! -f /backup/dropbear_ecdsa_host_key ]; then
	dropbearkey -t ecdsa -f /backup/dropbear_ecdsa_host_key
fi

cp /backup/dropbear_ecdsa_host_key /etc/dropbear/dropbear_ecdsa_host_key
